-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: modify gas oracle TS tooling to be friendly for all protocol types #5198
base: main
Are you sure you want to change the base?
Conversation
… trevor/igp-consolidation
… trevor/igp-consolidation
… trevor/igp-consolidation
… trevor/igp-consolidation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5198 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 103 103
Lines 2110 2110
Branches 190 190
=======================================
Hits 1636 1636
Misses 453 453
Partials 21 21
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to fix lint
} | ||
|
||
// Make the exchange rate an integer by scaling it up by the appropriate factor for the protocol. | ||
let exchangeRate = getProtocolExchangeRate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let exchangeRate = getProtocolExchangeRate( | |
const exchangeRate = getProtocolExchangeRate( |
parseFloat(gasOracleParams[remote].gasPrice.amount) * | ||
Math.pow(10, gasOracleParams[remote].gasPrice.decimals); | ||
if (isNaN(gasPrice)) { | ||
let gasPrice = new BigNumberJs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let gasPrice = new BigNumberJs( | |
const gasPrice = new BigNumberJs( |
@@ -1,19 +1,18 @@ | |||
import { Provider } from '@ethersproject/providers'; | |||
import { BigNumber as BigNumberJs } from 'bignumber.js'; | |||
import { assert } from 'console'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think you actually wanted import { assert} from '@hyperlane-xyz/utils'
Description
./scripts/sealevel-helpers/print-gas-oracles.ts
that outputs all SVM gas oracles that can be plugged into SVM tooling (opening a separate PR for the SVM tooling bits)Drive-by changes
Related issues
Backward compatibility
Testing